'use client';

import { useRouter } from 'next/navigation';
import NoTabBarLayout from '../../../components/layout/NoTabBarLayout';
import TravelAssistant from '../../../components/TravelAssistant/TravelAssistant';
import styles from './page.module.css';

export default function TravelAssistantPage() {
  const router = useRouter();

  // 处理返回
  const handleBack = () => {
    router.push('/message');
  };

  return (
    <NoTabBarLayout>
      <div className={styles.travelAssistantPage}>
        {/* 头部 */}
        <div className={styles.header}>
          <div className={styles.backButton} onClick={handleBack}>
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
              <path d="M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z" fill="#333"/>
            </svg>
          </div>
          <div className={styles.headerTitle}>旅游助手</div>
        </div>
        
        {/* 旅游助手组件 */}
        <div className={styles.assistantContainer}>
          <TravelAssistant />
        </div>
      </div>
    </NoTabBarLayout>
  );
}